package com.loan.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
;
import com.loan.exeception.AppException;
import com.loan.exeception.AppExceptionCodeMsg;
import com.loan.mapper.SuccessApplyMapper;
import com.loan.entity.SuccessApply;
import com.loan.service.AvaloanService;
import com.loan.service.SuccessApplyService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
* @author z
* @description 针对表【success_apply】的数据库操作Service实现
* @createDate 2023-04-21 14:51:41
*/
@Service
public class SuccessApplyServiceImpl extends ServiceImpl<SuccessApplyMapper, SuccessApply> implements SuccessApplyService {
    @Resource
    private SuccessApplyMapper successApplyMapper;
    @Resource
    private AvaloanService avaloanService;


    @Override
    public void addSuccessLoanApply(SuccessApply successApply) {
        int num = successApplyMapper.insert(successApply);
        if (num!= 1) {
            throw new AppException(AppExceptionCodeMsg.APPLY_LOAN_ERROR);
        }
    }
}




